﻿using DefCore;
using DefCore.Tools;
using DefCore.Mapping;
using DefCore.Structures;
using Ivory;
using Krypton;
using Krypton.Lights;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Defender.Framework.Structures
{
    public sealed class IronBridgeBlueprint : Blueprint
    {
        //fields

        //ctor
        public IronBridgeBlueprint()
            : base(new Vector2(Globals.TileSize.X, Globals.TileSize.X), BlueprintFrameType.FULLFRAME)
        {

        }

        //Methods
        protected override void RenderBlueprint(SpriteBatch batch, GameTime time)
        {
            batch.Draw(StructureBin.Instance.GetStructure("LANTERN", true), (Rectangle)HitRect, Color.White);
        }

        public override bool ValidatePlacement(CellBase cell)
        {
            return (cell is WaterCell) || (cell is LavaCell);
        }
        public override Structure CreateStructure(CellBase cell, StructureFrameEnum frame)
        {
            return StructureFactory.Create<WoodBridge>(cell, frame);
        }
    }

    public sealed class IronBridge : Structure
    {        
        //Fields
        
        //ctor
        public IronBridge(CellBase cell, StructureFrameEnum frame)
            : base(cell, StructureType.Passive, frame)
        {

        }

        //Methods
        protected override void OnCreate()
        {
  
        }
        protected override void OnDelete()
        {
            
        }

        public override void Render(SpriteBatch batch, GameTime time)
        {
            batch.Draw(StructureBin.Instance.GetStructure("LANTERN", false), HitBox, Color.White);
        }
        public override void Solve(InputControl control, GameTime time)
        {
        }

    }
}
